﻿using System;
using System.Linq;
using System.Linq.Expressions;
using System.Collections.Generic;

namespace Solution.Business.Core
{
    public interface ICommonDAL<T>
    {
        bool Insert(T pEntity);
        bool Insert(IEnumerable<T> lEntity);
        bool Delete(T pEntity); 
        bool Update(T pEntity);
        T GetOne(int Id);
        void Attach(T pEntity);
        // void Detach(T pEntity);
        void ReLoad(T pEntity);
        IQueryable<T> Find(Expression<Func<T, bool>> where);
        IQueryable<T> GetAll();
        void SaveChange();
    }
}
